<?php 
	session_start();
	require_once("../includes/public.inc.php");
	$username = isset($_SESSION['username'])?$_SESSION['username']:'';
	if (empty($username))
	{
		echo "<script>alert('亲你还没有登录哦');history.back();</script>";	exit;
	}
	$hb = mysql_query("select * from ".DBQIAN."exchangedg where username='".$username."'");
//	   $result=mysql_query("select id from table_a");
//		$ar=array();
//		while($rows=$mysql_fetch_array($result))
//		{
//		   $ar[] = rows['id'];//把id存放到数组里
//		}   
?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="viewport" content="user-scalable=yes, width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>红包记录</title>
<link rel="stylesheet" type="text/css" href="css/huodong.css" media="all">
</head>
<body>
<div class="pz-css">
	<ul class="top-tool">
		<li class="title">红包记录</li>
		<li class="back"><a href="javascript:history.go(-1)"></a>
		</li><li class="home"><a href="index.php?type=<?=$_GET['type']?>"></a></li>
	</ul>
		<div class="list" style="padding: 5px;">
       <? while($row = mysql_fetch_assoc($hb)){?>
		<a href="hd_detail.php?id=<?=$row['id']?>&type=<?=$_GET['type']?>" style="background: url('ico.png') no-repeat scroll right center rgb(255, 255, 255);" class="item">
			<h4>防伪码:<?=$row['fwm']?></h4>
			<h5>金额:<?=$row['credit']?>元 &nbsp;&nbsp;&nbsp;&nbsp;#时间:<?=$row['time']?></h5>
		</a>
	  <?}?>	
		</div>
		
	<div class="span12"><button type="button" class="red" onclick="javascript:history.go(-1)">返回</button></div>
</div>
</body>
</html>